/**
 * comment
 */
package org.hawk.gwt.ppc;

import org.hawk.gwt.ppc.utils.AntPattern;
import org.hawk.gwt.ppc.utils.Pattern;

/**
 * Holds all methods to access environment configuration.
 * 
 * @author alex.bereznevatiy@gmail.com
 */
public interface Configuration {
	String REFLECTION_PARAMETER = "reflect";
	String PATTERN_PARAMETER = "pattern";
	String KEEP_PREPROCESSED_SOURCES_PARAMETER = "keep-preprocessed-sources";
	/**
	 * @param name
	 * @return value of parameter with name specified or <code>null</code>
	 * if parameter doesn't exists.
	 */
	String get(String name);
	/**
	 * 
	 * @param <T>
	 * @param name
	 * @param defaultValue
	 * @return value of parameter with name specified or defaultValue
	 * if parameter doesn't exists.
	 */
	<T> T get(String name,T defaultValue);
	/**
	 * Creates new pattern based on configuration.
	 * Default pattern is {@link AntPattern}.
	 * @param p
	 * @return new instance of pattern.
	 */
	Pattern getNewPattern(String p);
}
